<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:espace="espace:StringHelper">
<xsl:output method="text" />
<xsl:template match="/">/*******************************************************************************
** File Name:		     I<xsl:value-of select="Schema/@TableName" />Service.cs
** Creator:		       <xsl:value-of select="Schema/@UserName" />
** EMail:            <xsl:value-of select="Schema/@UserEMail" /> 
** Create date:	     <xsl:value-of select="Schema/@ModifyDate" />
** Latest Modifier:
** Latest Modify date:
** Description:
** Modify History:
**
** Code Review:
**
** Version number:       1.0.0
*********************************************************************************/

using System.Collections.Generic;
using System.Data;
using System.ServiceModel;
using System.Runtime.Serialization;
using <xsl:value-of select="Schema/@DomainNameSpace" />;

namespace <xsl:value-of select="Schema/@ServiceNameSpace" />
{
	///&lt;summary&gt;
	/// 接口层I<xsl:value-of select="Schema/@TableName" />的摘要说明。
	///&lt;/summary&gt;
	[ServiceContract]
	[XmlSerializerFormat]
	public interface I<xsl:value-of select="Schema/@TableName" />Service
	{
		///&lt;summary&gt;
		/// 增加一条数据
		///&lt;/summary&gt;
		[OperationContract]
		void Add<xsl:value-of select="Schema/@TableName" />(<xsl:value-of select="concat(Schema/@TableName, ' ', espace:PascalToCamel(Schema/@TableName))" />);
		///&lt;summary&gt;
		/// 获得数据列表集合
		///&lt;/summary&gt;
		[OperationContract]
		IList&lt;<xsl:value-of select="Schema/@TableName" />&gt;GetAll();

		///&lt;summary&gt;
		/// 获得数据列表
		///&lt;/summary&gt;
		[OperationContract]
		DataTable GetAll<xsl:value-of select="Schema/@TableName" />();<xsl:if test="Schema/@IfHavePK=1 and Schema/@IfAllPK=0">
		///&lt;summary&gt;
		/// 更新一条数据
		///&lt;/summary&gt;
		[OperationContract]
		void Update<xsl:value-of select="Schema/@TableName" />(<xsl:value-of select="concat(Schema/@TableName, ' ', espace:PascalToCamel(Schema/@TableName))" />);
		///&lt;summary&gt;
		/// 删除一条数据
		///&lt;/summary&gt;
		[OperationContract]
		void Delete<xsl:value-of select="Schema/@TableName" />(<xsl:for-each select="Schema/Columns[IsPK='1']"><xsl:value-of select="concat(LanguageType,' ',espace:PascalToCamel(ColumnName))" /><xsl:if test="position()!=last()">,</xsl:if></xsl:for-each>);

		[OperationContract]
  <xsl:value-of select="Schema/@TableName" /> Get<xsl:value-of select="Schema/@TableName" />(<xsl:for-each select="Schema/Columns[IsPK='1']"><xsl:value-of select="concat(LanguageType,' ',espace:PascalToCamel(ColumnName))" /><xsl:if test="position()!=last()">,</xsl:if></xsl:for-each>);
</xsl:if>
<xsl:for-each select="Schema/ForeignKeys/ForeignKey">
		[OperationContract]
		DataTable Get<xsl:value-of select="/Schema/@TableName" />By<xsl:for-each select="Column"><xsl:value-of select="FKCOLUMN_NAME" /><xsl:if test="position()!=last()">AND</xsl:if></xsl:for-each>(<xsl:for-each select="Column"><xsl:value-of select="concat(LanguageType,' ',FKCOLUMN_NAME)" /><xsl:if test="position()!=last()">,</xsl:if></xsl:for-each>);
</xsl:for-each>
		//[OperationContract]
		//DataTable Get<xsl:value-of select="Schema/@TableName" />ByConditions(String keyWord,
		//int pageSize, ref int pageIndex, out int totalPage, out int totalRecord, string sort);
  }

}</xsl:template>
</xsl:stylesheet>